/** less 常用css 通用
* author: fivexu
* date:2019/11/25
*/
@import "common";

body {
  padding: $system-padding-top $system-padding-right $system-padding-bottom $system-padding-left;
}

// 定位居中
@mixin position_center($type:absolute) {
  position: $type;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  margin: auto;
}

// 定位顶部
@mixin position_top($type:absolute) {
  position: $type;
  left: 0;
  right: 0;
  top: 0;
  margin: 0 auto;
}

// 定位右方
@mixin position_right($type:absolute) {
  position: $type;
  right: 0;
  bottom: 0;
  top: 0;
  margin: auto 0;
}

// 定位底部
@mixin position_bottom($type:absolute) {
  position: $type;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
}

// 定位左方
@mixin position_left($type:absolute) {
  position: $type;
  left: 0;
  bottom: 0;
  top: 0;
  margin: auto 0;
}

// 点击 波浪效果1
.click {
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;

  &:after {
    content: "";
    display: inline-block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 100%, transparent 100%) no-repeat center center / 100% 100%;
    opacity: 0;
    transition: all 0.3s, opacity 0.5s;
  }

  &:active:after {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-size: 0 0;
    opacity: 0.3;
    transition: 0s;
  }
}

// 点击 波浪效果2
.click_ac {
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;

  &:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #41556c 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.3s, opacity 0.5s;
  }

  &:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
  }
}

// 文字超出 显示省略号
.text_hide {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 文字超出 显示省略号
@mixin text_hide($num:1) {
  word-break: break-all;
  word-wrap: break-word;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: $num;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

// 弹性布局 垂直方向
@mixin dfc($type: space-between) {
  display: flex;
  justify-content: $type;
  flex-wrap: nowrap;
  flex-direction: column;
}

// 弹性布局 横向方向
@mixin dfr($content:space-between,$wrap:nowrap) {
  display: flex;
  justify-content: $content;
  flex-wrap: $wrap;
}

.hiddenX {
  overflow-x: hidden;
  overflow-y: auto;
}

.hiddenY {
  overflow-y: hidden;
  overflow-x: auto;
}

// loading
@keyframes loading-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -40px;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -120px;
  }
}

@keyframes loading-rotate {
  100% {
    transform: rotate(1turn);
  }
}

.fivexu_loading_svg {
  height: 50px;
  width: 50px;
  transform-origin: center;
  animation: loading-rotate 2s linear infinite;
}

.fivexu_loading_circle {
  animation: loading-dash 1.5s ease-in-out infinite;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  stroke-width: 4px;
  stroke: #395eff;
  stroke-linecap: round;
}

.fivexu_loading_wrapper {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  z-index: 1001;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);

  .fivexu_loading_content {
    width: 50px;
    height: 50px;
    line-height: 50px !important;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
  }
}

// hover 滚动条
.hover_bar {
  &::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 10px;
    transition: all 0.3s;
  }

  &:hover::-webkit-scrollbar-thumb {
    background-color: #d9dee6;
  }
}

.route-title {
  font-weight: bolder;
  font-size: 30px;
  height: 40px;
  line-height: 40px;
}

.model-line-wrapper {
  padding: 40px;
  position: relative;

  &::before, &::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
  }

  &::before {
    top: 0;
    background: linear-gradient(to right, #9688FF, #AAE5FB);
  }

  &::after {
    bottom: 0;
    background: linear-gradient(to left, #9688FF, #AAE5FB);
  }

  > .content {
    display: flex;
    justify-content: center;
    padding-bottom: 30px;

    > span {
      display: inline-block;
      font-size: 40px;
      margin-right: 10px;
    }

    > .text {
      height: 40px;
      line-height: 20px;
    }
  }

  > .footer {
    display: flex;
    justify-content: center;
    text-align: center;

    .btn-item {
      width: 100px;
    }
  }
}
